package gbench.mybatis.junit;

import static gbench.common.tree.LittleTree.IRecord.REC;

import java.util.List;

import org.junit.jupiter.api.Test;

import gbench.mybatis.MybatisUtil;
import gbench.mybatis.entity.User;
import gbench.mybatis.util.Output;

/**
 * 
 * @author xuqinghua
 *
 */
public class JunitMyBatis {
	
	@SuppressWarnings("unchecked")
	@Test
	public void foo() {
		final var sess = MybatisUtil.getSqlSession();
		final var param = REC("name", "zhangsan").toMap();
		Output.println((List<User>) (Object) sess.selectList("select_user", param));
		sess.commit();
		sess.close();
	}

}
